//
//  YsCloudFolderManager.h
//  YsCloudFileManageSDK
//
//  Created by 宋宏康 on 2020/2/26.
//

#import <Foundation/Foundation.h>
#import "YsCloudFileManagerHeader.h"
#import "YsCloudFileDownloadModel.h"
#import "YsDocUploadModel.h"
#import "YsCloudFileDownloadModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface YsCloudFolderManager : NSObject

/// 返回一个上传视频的地址
/// @param accountCode 用户外键
/// @param lastPathComponent 后缀 eg/ ,png/.mp4
+ (NSString *)getPathToCacheViedoWithAccountCode:(NSString *)accountCode
                           withlastPathComponent:(NSString *)lastPathComponent DEPRECATED_ATTRIBUTE;

/// 返回一个上传视频的地址
/// @param accountCode 用户外键
/// @param lastPathComponent  后缀 eg/ ,png/.mp4
/// @param fileName 文件名
+ (NSString *)getPathToCacheViedoWithAccountCode:(NSString *)accountCode
                           withlastPathComponent:(NSString *)lastPathComponent
                                    withfileName:(NSString *)fileName;

/// 返回一个保存图片的地址
/// @param accountCode 用户外键
/// @param lastPathComponent 后缀
/// @param image 图片
+ (NSString *)getPathToCacheImageWithAccountCode:(NSString *)accountCode
                           withlastPathComponent:(NSString *)lastPathComponent
                                       withImage:(UIImage *)image;
/// 返回一个下载缓存的地址
/// @param accountCode 用户外键
/// @param lastPathComponent 文件后缀
/// @param fileName 文件名
+ (NSString *)getPathToCacheDownloadFileWithAccountCode:(NSString *)accountCode
                                  withlastPathComponent:(NSString *)lastPathComponent
                                           withFileName:(NSString *)fileName DEPRECATED_ATTRIBUTE;


/// 返回一个临时存放断点下载的路径
/// @param accountCode 用户外键
/// @param downloadUrl 下载的URL
+ (NSString *)getTmpDownloadPathTocacheFileWithAccountCode:(NSString *)accountCode
                                           withDownloadUrl:(NSString *)downloadUrl DEPRECATED_ATTRIBUTE;


/// 返回一个临时存放断点下载的路径
/// @param accountCode 用户外键
/// @param downloadUrl 下载的URL
/// @param name 文件名
+ (NSString *)getTmpDownloadPathTocacheFileWithAccountCode:(NSString *)accountCode
                                                  withName:(NSString *)name;

/// 返回一个下载文件到本地的地址
/// @param accountCode 用户外键
/// @param lastPathComponent 后缀名
/// @param name 文件名
+ (NSString *)getDownloadPathToCacheFileWithAccountCode:(NSString *)accountCode
                                  withlastPathComponent:(NSString *)lastPathComponent
                                               withName:(NSString *)name;


/// 检查本地文件是否存在
/// @param downloadModel 下载任务模型
/// @param accountCode 用户外键
+ (BOOL)checkDownloadFileExistenceWithDownloadModel:(YsCloudFileDownloadModel *)downloadModel withAccountCode:(NSString *)accountCode;


/// 删除本地的文件和本地数据库的数据 上传的任务
/// @param uploadModel 上传的任务模型
+ (void)deleteLocalFileAndRealmDataWithuploadModel:(YsDocUploadModel *)uploadModel;


///删除本地的文件和本地数据库的数据 下载的任务
/// @param downloadModel 下载的任务模型
+ (void)deleteLocalFileAndRealmDataWithdownloadModel:(YsCloudFileDownloadModel *)downloadModel;
@end

NS_ASSUME_NONNULL_END
